import React, { Component } from 'react'
import Search from './components/Search'
import List from './components/List'

export default class App extends Component {
	state = {
		users:[],//存储用户
		isFirst:true, //标识是否为初次展示
		isLoading:false, //标识是否处于加载中
		errMsg:'' //存储错误信息
	}

	render() {
		return (
			<div className="container">
				<Search getSearchInfo={this.getSearchInfo}/>
				<List {...this.state}/>
			</div>
		)
	}

	getSearchInfo = (obj)=>{
		this.setState(obj)
	}

}
